<script setup>
import {get_Carousel} from "@/api/carousel";
import {ref, onMounted} from "vue";

const carouseData = ref([])
const initCarousel = async () => {
  const res = await get_Carousel()
  if (res.code === 200) {
    carouseData.value = res.data;
  }
}
const deleteCarouse = () => {

}
//初始化
onMounted(() => {
  initCarousel();
})
</script>

<template>
  <div>
    <el-table :data="carouseData">
      <el-table-column label="图片">
        <template #default="scope">
          <el-image :src="scope.row.imageUrl"></el-image>
        </template>
      </el-table-column>
      <el-table-column label="操作">
        <template #default="scope">
          <el-button type="primary" @click="deleteCarouse">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<style scoped>

</style>
